﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using NhanAi.DAO;
using NhanAi.Entity;
namespace NhanAi.Public 
{
    public partial class Classroom : PublicBasePage
    {
        List<Post> posts;

        public List<Post> Posts { get { return posts; } }
        protected void Page_Load(object sender, EventArgs e)
        {
            Authenticate();
            PostDao daoPost = new PostDao();
            int total = 0;
            posts = daoPost.ReadMany(15, 1, NhanAi.App_Code.NAConstants.LANGUAGE_VI, "cp", null, false, -1, NhanAi.App_Code.NAConstants.POST_STA_POST, null, null, out total);

            int page = Home.Utils.TypeWrapper.GetInt32(Request["page"]);
            paging.PageNumber = page;
            paging.TotalItemCount = total;


            paging.PageSize = 15;
        }
    }
}